package nz.co.doherty.gwtpbreadcrumbs.server.guice;

import nz.co.doherty.gwtpbreadcrumbs.shared.entity.Customer;
import nz.co.doherty.gwtpbreadcrumbs.shared.entity.Product;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
import com.googlecode.objectify.ObjectifyService;

public class GuiceServletConfig extends GuiceServletContextListener {

	@Override
	protected Injector getInjector() {
		
        ObjectifyService.register(Product.class);
        ObjectifyService.register(Customer.class);
		        
		return Guice.createInjector(new DispatchServletModule(),
			new DispatchHandlerModule());
	}
}
